package com.hospital.ssm.service.serviceimpl;

import com.hospital.ssm.dto.UserDto;
import com.hospital.ssm.mapper.SysUserMapper;
import com.hospital.ssm.service.SysUserService;
import com.hospital.ssm.vo.UserVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SysUserServiceImpl implements SysUserService {
    @Autowired
    private SysUserMapper sysUserMapper;

    @Override
    public UserDto login(UserDto userDto) {
        UserDto user = sysUserMapper.login(userDto);
        return user;
    }

    @Override
    public UserDto logindoctor(UserDto userDto) {
        UserDto user = sysUserMapper.logindoctor(userDto);
        return user;
    }

    @Override
    public String exit(String username) {
        String user = sysUserMapper.exit(username);
        return user;
    }

    @Override
    public String exitdoctor(String username) {
        String user=sysUserMapper.exitdoctor(username);
        return user;
    }

    @Override
    public int adduser(UserDto userDto) {
        int n= sysUserMapper.adduser(userDto);
        return n;
    }

    @Override
    public int adddoctoruser(UserDto userDto) {
        int n=sysUserMapper.adddoctoruser(userDto);
        return n;
    }

}
